---
layout: default
---

<div class="container-fluid" style="margin-top:20px">
  <div class="container-fluid">
    <div class="row">
      <ol class="breadcrumb">
        <li><a href="{{site.baseurl}}/">Home</a></li>
        <li class="active">Packages</li>
      </ol>
    </div>
    <div class="row">
      {% include distro_switch.html %}
    </div>
    <div class="row">
      &nbsp;
    </div>
    {% for distro in page.all_distros %}
      <div class="row distro distro-{{distro}}">
        <div class="panel panel-default">
          <div class="panel-heading"><h3 class="panel-title">Packages </h3></div>
          <div class="table-responsive">
            <table class="table table-condensed table-striped table-hover">
              <thead>
                <tr>
                  <th style="text-align: center;">
                    <span class="glyphicon glyphicon-th"
                          title="Package instances"></span>
                  </th>
                  <th style="text-align: center;">
                    {% if page.sort_id == 'released' %}
                      <span class="glyphicon glyphicon-flash selected-sort-label"
                            title="Sorted by release status"></span>
                    {% else %}
                      <a href="{{site.baseurl}}/packages/page/1/released"
                         class="unselected-sort-label glyphicon glyphicon-flash"
                         title="Sort by release status"></a>
                    {% endif %}
                  </th>
                  <th style="text-align: center;">
                    {% if page.sort_id == 'time' %}
                      <span class="glyphicon glyphicon-time selected-sort-label"
                            title="Sorted by last commit date"></span>
                    {% else %}
                      <a href="{{site.baseurl}}/packages/page/1/time"
                         class="unselected-sort-label glyphicon glyphicon-time"
                         title="Sort by last commit date"></a>
                    {% endif %}
                  </th>
                  <th style="text-align: left;">
                    {% if page.sort_id == 'name' %}
                      <span class="selected-sort-label"
                            title="Sorted by package name">Name</span>
                    {% else %}
                      <a href="{{site.baseurl}}/packages/page/1/name"
                         class="unselected-sort-label"
                         title="Sort by package name">Name</a>
                    {% endif %}
                  </th>
                  <th width="100%">Description</th>
                </tr>
              </thead>
              <tbody>
              {% for package in page.list[distro] %}
                {% assign r = package[1].repos[distro].snapshots[distro] %}
                {% assign p = package[1].snapshots[distro] %}
                {% assign n_instances = package[1].instances | size %}
                <tr>
                  <td title="View Package Instances" data-toggle="tooltip" data-placement="left" align="center">
                    <a href="{{site.baseurl}}/packages/{{package[0]}}" class="label label-{% if n_instances > 1 %}primary{% else %}default{% endif %}">
                        {{n_instances}}
                    </a>
                  </td>
                  {% if p %}
                    {% if r.released %}
                      <td class="text-center">
                        <span title="Released in {{distro}}" data-toggle="tooltip" data-placement="left" class="glyphicon glyphicon-flash"></span>
                      </td>
                    {% else %}
                      <td title="Not released in {{distro}}" data-toggle="tooltip" data-placement="left" class="text-center">
                        <span class="glyphicon glyphicon-none"></span>
                      </td>
                    {% endif %}
                    <td>
                      <span title="Last commit date" class="label label-default">{{ r.data.last_commit_time }}</span>
                    </td>
                    <td>
                      <a href="{{site.baseurl}}/p/{{package[0]}}">{{ package[0] }}</a>
                    </td>
                    <td>
                      <div class="truncate">
                        <div class="spacer">{{ p.data.description }}</div>
                        <div class="content">{{ p.data.description }}</div>
                        <span>&nbsp;</span>
                      </div>
                    </td>
                  {% else %}
                    <td></td>
                    <td></td>
                    <td>
                      <a class="inactive" href="{{site.baseurl}}/p/{{package[0]}}">{{ package[0] }}</a>
                    </td>
                    <td></td>
                  {% endif %}
                </tr>
              {% endfor %}
              </tbody>
            </table>
          </div>
        </div>
      </div>
    {% endfor %}
    <div class="row text-center">
      {% include package_pager.html %}
    </div>
  </div>
</div>

<script type="text/javascript">
  $(document).ready(function() {
    setupDistroSwitch("{{ site.distros[0] }}");
  });
</script>
